#ifndef __APP_MQTT_H__
#define __APP_MQTT_H__
#include "MQTTClient.h"
#include "cJSON/cJSON.h"
#include "stdio.h"
#include "string.h"
#include "log/log.h"
#include "stdlib.h"

#define ADDRESS "tcp://192.168.16.44:1883"
#define CLIENTID "b252ba66-daf6-4b37-984f-5d8fdc6a1cfa"
#define TOPIC_RTG "remote to gateway"
#define TOPIC_GTR "gateway to remote"
#define PAYLOAD "Hello World!"
#define QOS 1
#define TIMEOUT 10000L
// 初始化MQTT客户端
int App_Mqtt_Init(void);

// 关闭MQTT客户端
void App_Mqtt_Deinit(void);

// 向 MQTT 服务器发送 JSON 格式的消息
int App_Mqtt_SendJson(char *json);

// 注册 MQTT 消息接收回调函数
void App_Mqtt_RegisterCallback(void (*callback)(char *json));

#endif /* __APP_MQTT_H__ */
